package com.chapter10.demo2;

import java.util.Arrays;

/**
 * 数组的排序
 */
public class ObjectArraySort {
    public static void main(String[] args) {
        Student[] students = new Student[3];
        students[0]=new Student(55,"zhangsan");
        students[1]=new Student(43,"zhangsan");
        students[2]=new Student(65,"zhangsan");
        Arrays.sort(students);
        for (Student student:students) {
            System.out.println(student);
        }

    }
}
